const countDown="particulars-read";
const collect="particulars-collect"
const setCountDown=(id)=>{
	let count=getCountDown()
	count.push(id)
	uni.setStorageSync(countDown,JSON.stringify(count))
}
const getCountDown=()=>{
	let read=uni.getStorageSync(countDown)
	if(read){
		return JSON.parse(uni.getStorageSync(countDown)) ||[]
	}else{
		return uni.getStorageSync(countDown) ||[]
	}
}
const setCollect=(id)=>{
	console.log(id)
	let coll=getCollect()
	coll.push(id)
	uni.setStorageSync(collect,JSON.stringify(coll))
}
const getCollect=()=>{
	return JSON.parse(uni.getStorageSync(collect)) ||[]
}
const removeCollect=(id)=>{
	console.log(id)
	const coll=getCollect()
	coll.splice(coll.indexOf(id),1)
	console.log(coll)
	uni.setStorageSync(collect,JSON.stringify(coll))
}


module.exports={
	setCountDown,
	getCountDown,
	setCollect,
	getCollect,
	removeCollect
}